import { createMemoryHistory, createRouter } from 'vue-router'

import Login from '../components/Login.vue'
import Main from '../components/Main.vue'

import Box from '../components/view/box-m/Box.vue'
import Comment from '../components/view/comment-m/Comment.vue'
import Commoditym from '../components/view/commodity-m/Commoditym.vue'
import Commodityc from '../components/view/commodity-c/Commodityc.vue'
import User from '../components/view/user-m/User.vue'
import Data from '../components/view/data-m/Data.vue'
import Order from "../components/view/order-m/Order.vue";


const routes = [
    { path: '/', name:"/",meta:{title:"登录",power:10},component: Login },
    { path: '/main',name:"main",meta:{title:"主界面",power:10}, component: Main,children:[
            { path: '/user',name:"User",meta:{title:"用户管理",power:20},component: User },
            { path: '/commodityc',name:"commodityc",meta:{title:"商品审核",power:20},component: Commodityc },
            { path: '/commoditym',name:"commoditym",meta:{title:"商品管理",power:20},component: Commoditym },
            { path: '/box',name:"box",meta:{title:"盲盒审核",power:20},component: Box },
            { path: '/order',name:"order",meta:{title:"订单管理",power:20},component: Order },
            { path: '/comment',name:"comment",meta:{title:"评论管理",power:20},component: Comment},
            { path: '/data',name:"data",meta:{title:"数据展示",power:20},component: Data },
        ] },
]

const router = createRouter({
  history: createMemoryHistory(),
  routes,
})

export default router;


